package com.gyj.aop.datalog.dao;

import com.gyj.aop.datalog.model.Product;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.io.Serializable;

/**
 * Created by Gao on 2018/5/12.
 */
public interface ProductDao extends CrudRepository<Product, Integer>, Serializable {

    @Query(value = "select * from product where id= ?1", nativeQuery = true)
    public Product findOneById(Integer id);

}